module.exports = {
  getParams(req) {
    let params = { ...req.body, ...req.query };
    return params;
  },

  clearEmptyValue(params) {
    if (params) {
      for (let key in params) {
        let val = params[key];
        if (val === null || val === undefined) delete params[key];
      }
    }
  },
};
